package com.wewins.fota.bean.dto;

import com.wewins.fota.bean.po.PkgVersion;
import com.wewins.fota.bean.po.UpdatePlan;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
public class UpdatePlanDetails extends UpdatePlan {

    private List<PkgVersion> srcVersionList;

    private PkgVersion dstVersion;

    public UpdatePlanDetails fillBy(UpdatePlan plan) {
        this.setId(plan.getId());
        this.setName(plan.getName());
        this.setProduct(plan.getProduct());
        this.setCond(plan.getCond());
        this.setSrcV(plan.getSrcV());
        this.setDstV(plan.getDstV());
        return this;
    }
}
